import java.util.*;

// Calculator
//
//							Enter first float input
//							bgh
//							Please enter float type only
//							java.util.InputMismatchException
//							86
//
//							Enter second float input
//							mkl
//							Please enter float type only
//							java.util.InputMismatchException
//							lo
//							Please enter float type only
//							java.util.InputMismatchException
//							97
//
//							Please enter one of the operations (+,-,*,/)
//							nm
//							Please enter one of the operations (+,-,*,/)
//							12
//							Please enter one of the operations (+,-,*,/)
//							*
//
//							Result of expression 86.0*97.0 = 8342.0



public class Calculator {
	
	public static void main(String[] args) {
		CalcAPI mycalc = new CalcAPI();
		System.out.println("Enter first float input");
		float intone = mycalc.getFloatInput();
		System.out.println("Enter second float input");
		float inttwo = mycalc.getFloatInput();
		//get operation input
		Scanner s2 = new Scanner(System.in);
		String operation;
		do {
			System.out.println("Please enter one of the operations (+,-,*,/)");
			operation = s2.nextLine();
		}while(!((operation.equals("+"))||(operation.equals("-"))||(operation.equals("*"))||(operation.equals("/"))));
		//compute expression
		float result = 0;
		if(operation.equals("+")) {
			result = mycalc.add(intone,inttwo);			
		} else if(operation.equals("-")) {
			result = mycalc.subtract(intone,inttwo);			
		} else if(operation.equals("*")) {
			result = mycalc.multiply(intone,inttwo);			
		} else if(operation.equals("/")) {
			result = mycalc.divide(intone,inttwo);			
		} 
		System.out.println("Result of expression " + intone + operation + inttwo + " = " + result);
	}

}
